package tools;
import java.io.*;

public class fileReader {//读取文件的工具
    public static String readFile(String file){
        String content ="";
        try{
            FileReader reader = new FileReader(file);
            BufferedReader br = new BufferedReader(reader);
            String line;
            while((line = br.readLine())!=null){
                content += line;
            }
        }catch (IOException e){
            e.printStackTrace();
        }
        return content;//返回读取到的本文数据
    }
}
